<article class="author">
  {% if page.rel.me or page.author.twitter %}
    <section class="author-follow">
      <h2>Follow {{page.author.fname}}</h2>
      <ul>
        {% if page.rel.me %}
          <li><a rel="me" href="{{page.rel.me}}">+{{page.author.fname}} {{page.author.lname}}</a></li>
        {% endif %}
        {% if page.author.twitter %}
          <li><a href="https://twitter.com/{{page.author.twitter}}">@{{page.author.twitter}}</a></li>
        {% endif %}
      </ul>
    </section>
  {% endif %}

  <section class="author-bio">
    <h2>Bio</h2>
    {{bio}}
  </section>

  {% assign empty_list = true %}
  {% for article in site.pages %}
    {% if article.rel and article.rel.author == page.author.key %}
      {% assign article_url = article.url | remove:'index.html' %}
      {% if empty_list %}
        {% assign empty_list = false %}
  <section class="author-articles">
    <h2>On this site</h2>
    <ul>
      {% endif %}
      <li><a href="{{article_url}}">{{article.title}}</a></li>
    {% endif %}
  {% endfor %}
  {% if empty_list == false %}
    </ul>
  </section>
  {% endif %}

</article>
